<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
       <p>{{ msg }}</p>

       <button @click="msg = 'hello'">修改msg</button>
    </div>
</body>
</html>
<script>
    var vm = new Vue({
        el: '#app',
        data: { 
           msg: 'welcome'
        },
        created(){
            console.log(1111)
        },
        mounted(){
            console.log(2222)
        },
        updated(){
            console.log(3333)
        }
    })
</script>